//表单配置项
const formItemData = {
  'warehouseId': {
    itemConfig: {
      name: 'warehouseId'
    },
    elConfig: {
      formType: 'Select',
      placeholder: '仓库',
      options: []
    }
  },
  'expressId': {
    itemConfig: {
      name: 'expressId'
    },
    elConfig: {
      formType: 'Select',
      placeholder: '快递公司',
      options: []
    }
  },
  'status': {
    itemConfig: {
      name: 'status'
    },
    elConfig: {
      formType: 'Select',
      placeholder: '是否启用',
      options: [
        {label: '是', value: 1 },
        {label: '否', value: 2 },
      ]
    }
  },
}

//处理表单数据
export const getFormItem = (optionsData) => {
  const arr = [];
  Object.keys(formItemData).map(v => {
    if(optionsData && optionsData[v]) {
      formItemData[v].elConfig.options = optionsData[v];
    }
    arr.push(formItemData[v]);
  })
  return arr;
}